<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据传递</title>
</head>
<body>
<div id="app">
    <login-to :name="msg"></login-to>
    <input type="text" v-model="msg">
</div>
</body>
</html>
<script type="module">
    import {} from './js/vue.js'

    // 定义组件
    let loginTo = {
        template: '<div>欢迎 {{name}} 进入直播间</div>',
        props: ['name'], // 接收标签传递过来的值
    }

    const app = new Vue({
        el: '#app',
        data: {
            msg: 'hello vue'
        },
        components: {
            loginTo: loginTo
        }
    })
</script>